import Api from '@/services/api.js';
export default {
  components: {
  },
  data() {
    return {
      list: [],
    }
  },
  computed: {
    companyInfo() {
      return this.$store.state.companyInfo;
    }
  },
  onLoad(options) {
    this.getEnterpriseList();
  },
  mounted() {
  },
  methods: {
    async getEnterpriseList() {
      this.list = await this.$Serv.getEnterpriseList('self');
    },
    handleItem(e) {
      const { item } = e.currentTarget.dataset;
      this.$store.commit('setStore', {
        companyInfo: {
          enterpriseId: item.id,
          companyName: item.title,
          logoUrl: item.logoUrl
        }
      })
      const eventChannel = this.getOpenerEventChannel();
      eventChannel.emit('refresh')
      uni.navigateBack();
    }
  },
  
}